Optimal. Leaf size=87 \[ \frac {(A b-2 a B) x}{b^3}+\frac {B x^3}{3 b^2}+\frac {a (A b-a B) x}{2 b^3 \left (a+b x^2\right )}-\frac {\sqrt {a} (3 A b-5 a B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 b^{7/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {466, 1167, 211}
\begin {gather*} -\frac {\sqrt {a} (3 A b-5 a B) \text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 b^{7/2}}+\frac {a x (A b-a B)}{2 b^3 \left (a+b x^2\right )}+\frac {x (A b-2 a B)}{b^3}+\frac {B x^3}{3 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 466
Rule 1167
Rubi steps
\begin {align*} \int \frac {x^4 \left (A+B x^2\right )}{\left (a+b x^2\right )^2} \, dx &=\frac {a (A b-a B) x}{2 b^3 \left (a+b x^2\right )}-\frac {\int \frac {a (A b-a B)-2 b (A b-a B) x^2-2 b^2 B x^4}{a+b x^2} \, dx}{2 b^3}\\ &=\frac {a (A b-a B) x}{2 b^3 \left (a+b x^2\right )}-\frac {\int \left (-2 (A b-2 a B)-2 b B x^2+\frac {3 a A b-5 a^2 B}{a+b x^2}\right ) \, dx}{2 b^3}\\ &=\frac {(A b-2 a B) x}{b^3}+\frac {B x^3}{3 b^2}+\frac {a (A b-a B) x}{2 b^3 \left (a+b x^2\right )}-\frac {(a (3 A b-5 a B)) \int \frac {1}{a+b x^2} \, dx}{2 b^3}\\ &=\frac {(A b-2 a B) x}{b^3}+\frac {B x^3}{3 b^2}+\frac {a (A b-a B) x}{2 b^3 \left (a+b x^2\right )}-\frac {\sqrt {a} (3 A b-5 a B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 b^{7/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 89, normalized size = 1.02 \begin {gather*} \frac {(A b-2 a B) x}{b^3}+\frac {B x^3}{3 b^2}+\frac {\left (a A b-a^2 B\right ) x}{2 b^3 \left (a+b x^2\right )}+\frac {\sqrt {a} (-3 A b+5 a B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 b^{7/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 75, normalized size = 0.86
method | result | size |
default | \(\frac {\frac {1}{3} b B \,x^{3}+A b x -2 B a x}{b^{3}}-\frac {a \left (\frac {\left (-\frac {A b}{2}+\frac {B a}{2}\right ) x}{b \,x^{2}+a}+\frac {\left (3 A b -5 B a \right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}}\right )}{b^{3}}\) | \(75\) |
risch | \(\frac {B \,x^{3}}{3 b^{2}}+\frac {A x}{b^{2}}-\frac {2 B a x}{b^{3}}+\frac {\left (\frac {1}{2} a b A -\frac {1}{2} a^{2} B \right ) x}{b^{3} \left (b \,x^{2}+a \right )}+\frac {3 \sqrt {-a b}\, \ln \left (-\sqrt {-a b}\, x -a \right ) A}{4 b^{3}}-\frac {5 \sqrt {-a b}\, \ln \left (-\sqrt {-a b}\, x -a \right ) B a}{4 b^{4}}-\frac {3 \sqrt {-a b}\, \ln \left (\sqrt {-a b}\, x -a \right ) A}{4 b^{3}}+\frac {5 \sqrt {-a b}\, \ln \left (\sqrt {-a b}\, x -a \right ) B a}{4 b^{4}}\) | \(155\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 85, normalized size = 0.98 \begin {gather*} -\frac {{\left (B a^{2} - A a b\right )} x}{2 \, {\left (b^{4} x^{2} + a b^{3}\right )}} + \frac {{\left (5 \, B a^{2} - 3 \, A a b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} b^{3}} + \frac {B b x^{3} - 3 \, {\left (2 \, B a - A b\right )} x}{3 \, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.71, size = 240, normalized size = 2.76 \begin {gather*} \left [\frac {4 \, B b^{2} x^{5} - 4 \, {\left (5 \, B a b - 3 \, A b^{2}\right )} x^{3} - 3 \, {\left (5 \, B a^{2} - 3 \, A a b + {\left (5 \, B a b - 3 \, A b^{2}\right )} x^{2}\right )} \sqrt {-\frac {a}{b}} \log \left (\frac {b x^{2} - 2 \, b x \sqrt {-\frac {a}{b}} - a}{b x^{2} + a}\right ) - 6 \, {\left (5 \, B a^{2} - 3 \, A a b\right )} x}{12 \, {\left (b^{4} x^{2} + a b^{3}\right )}}, \frac {2 \, B b^{2} x^{5} - 2 \, {\left (5 \, B a b - 3 \, A b^{2}\right )} x^{3} + 3 \, {\left (5 \, B a^{2} - 3 \, A a b + {\left (5 \, B a b - 3 \, A b^{2}\right )} x^{2}\right )} \sqrt {\frac {a}{b}} \arctan \left (\frac {b x \sqrt {\frac {a}{b}}}{a}\right ) - 3 \, {\left (5 \, B a^{2} - 3 \, A a b\right )} x}{6 \, {\left (b^{4} x^{2} + a b^{3}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.36, size = 129, normalized size = 1.48 \begin {gather*} \frac {B x^{3}}{3 b^{2}} + x \left (\frac {A}{b^{2}} - \frac {2 B a}{b^{3}}\right ) + \frac {x \left (A a b - B a^{2}\right )}{2 a b^{3} + 2 b^{4} x^{2}} - \frac {\sqrt {- \frac {a}{b^{7}}} \left (- 3 A b + 5 B a\right ) \log {\left (- b^{3} \sqrt {- \frac {a}{b^{7}}} + x \right )}}{4} + \frac {\sqrt {- \frac {a}{b^{7}}} \left (- 3 A b + 5 B a\right ) \log {\left (b^{3} \sqrt {- \frac {a}{b^{7}}} + x \right )}}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.02, size = 88, normalized size = 1.01 \begin {gather*} \frac {{\left (5 \, B a^{2} - 3 \, A a b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} b^{3}} - \frac {B a^{2} x - A a b x}{2 \, {\left (b x^{2} + a\right )} b^{3}} + \frac {B b^{4} x^{3} - 6 \, B a b^{3} x + 3 \, A b^{4} x}{3 \, b^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.04, size = 104, normalized size = 1.20 \begin {gather*} x\,\left (\frac {A}{b^2}-\frac {2\,B\,a}{b^3}\right )-\frac {x\,\left (\frac {B\,a^2}{2}-\frac {A\,a\,b}{2}\right )}{b^4\,x^2+a\,b^3}+\frac {B\,x^3}{3\,b^2}+\frac {\sqrt {a}\,\mathrm {atan}\left (\frac {\sqrt {a}\,\sqrt {b}\,x\,\left (3\,A\,b-5\,B\,a\right )}{5\,B\,a^2-3\,A\,a\,b}\right )\,\left (3\,A\,b-5\,B\,a\right )}{2\,b^{7/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________